package Student;

import java.util.Random;

public class TestStu {
    public static void main(String[] args) {
        Student s1 = new Student();
        System.out.println(s1.getWeight());

        int sportTimes = 0;
        int eatTimes = 0;
        Random random = new Random();

        while (true) {
            if (random.nextBoolean()) {
                s1.eat();
                eatTimes++;
            } else {
                s1.sport();
                sportTimes++;
            }
            if (s1.getWeight() >= 150) {
                System.out.println("sport times:" + sportTimes);
                System.out.println("eat   times:" + eatTimes);
                System.out.println("You eat too much. Please exercise more!!!");
                break;
            }
        }
    }
}
